<%-- 
    Document   : editAddress
    Created on : May 29, 2012, 10:19:07 PM
    Author     : Owner
--%>

<%--
<%if (Long.parseLong(String.valueOf(session.getAttribute("loginRoleId"))) == 0) {%>
<%@include file="/jsp/top.jsp"%>
<%} else if (Long.parseLong(String.valueOf(session.getAttribute("loginRoleId"))) == 1) {%>
<%@include file="/jsp/userTop.jsp"%>
<%} else if (Long.parseLong(String.valueOf(session.getAttribute("loginRoleId"))) == 2) {%>
<%@include file="/jsp/adminTop.jsp"%>
<%}%>--%>

<%@include file="/jsp/top.jsp"%>

<html>
    <head>
        <title>Manage Address</title>
    </head>
    <body class="user-address">
        <div class="clear"></div>
        <table cellspacing="5px" width="100%" align="center">
            <tr>
                <td>
                    <table cellspacing="5px" width="100%" align="center">
                        <tr>
                            <td style="vertical-align: top;" width="20%">
                                <div class="box-left box-menu">
                                    <div class="block block-account">
                                        <div class="block-title">
                                            <strong>
                                                <span>My Account</span>
                                            </strong>
                                        </div>
                                        <div class="block-content">
                                            <ul>
                                                <li><a class="show-dashboard" href="./userAccount.do?action=showAccountDashboard">Account Dashboard</a></li>
                                                <li><a class="show-dashboard" href="./userAccount.do?action=showEditUserPersonalInfo&changePassword='N'">Account Information</a></li>
                                                <li><a class="show-dashboard" href="./userAccount.do?action=showManageAddress">Manage Address</a></li>
                                                <li><a class="show-dashboard" href="./payment.do?action=showUserOrders">My Orders</a></li>
                                                <li><a class="show-dashboard" href="./userAccount.do?action=showAccountDashboard">My Wishlists</a></li>
                                                <li><a class="show-dashboard" href="./userAccount.do?action=showNewsletter">Newsletter Subscription</a></li>
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                            </td>
                            <td style="vertical-align: top;" width="80%">
                                <div class="manage-address default">
                                    <div class="page-title"><h1>Manage Addresses </h1>
                                        <div class="buttons-set">
                                            <a style="float:right;" href="./userAccount.do?action=showAddress" ><img src="images/add-new-address.png" alt="Add New Address Button" onmouseover="src='images/add-new-address-hover.png'" onmouseout="src='images/add-new-address.png'"/></a>
                                        </div>
                                    </div>
                                    <logic:present name="userAddressInfo" scope="request">
                                        <div class="col2-set addresses-list">
                                            <logic:empty name="userAddressInfo" scope="request">
                                                <div>No Records Found</div>
                                            </logic:empty>
                                            <% int i = 0;%>

                                            <div class="col-1 addresses-primary">
                                                <h2 class="legend">Default Addresses</h2>
                                                <logic:iterate id="addressInfo" name="userAddressInfo" scope="request">
                                                    <%i++;%>
                                                    <% if (i == 1) {%>
                                                    <div>
                                                        <h3 class="legend">Default Billing Address</h3>
                                                        <address>
                                                            <bean:write name="addressInfo" property="addrTitle"/>&nbsp;<bean:write name="addressInfo" property="addrFirstName"/>&nbsp;<bean:write name="addressInfo" property="addrMiddleName" ignore="true"/>&nbsp;<bean:write name="addressInfo" property="addrLastName"/>.<br/>
                                                            <bean:write name="addressInfo" property="house"/><br/>
                                                            <bean:write name="addressInfo" property="street"/><br/>
                                                            <bean:write name="addressInfo" property="city"/><br/>
                                                            <bean:write name="addressInfo" property="pinCode"/><br/>
                                                            <bean:write name="addressInfo" property="state"/><br/>
                                                            <bean:write name="addressInfo" property="contact"/><br/>
                                                        </address>
                                                        <a class="editaddress" href="./userAccount.do?action=showAddress&addrTypeId=<%=i%>">Edit Address</a>
                                                    </div>
                                                    <%} else if (i == 2) {%>
                                                    <div>
                                                        <h3 class="legend">Default Delivery Address</h3>
                                                        <address>
                                                            <bean:write name="addressInfo" property="addrTitle"/>&nbsp;<bean:write name="addressInfo" property="addrFirstName"/>&nbsp;<bean:write name="addressInfo" property="addrMiddleName" ignore="true"/>&nbsp;<bean:write name="addressInfo" property="addrLastName"/>.<br/>
                                                            <bean:write name="addressInfo" property="house"/><br/>
                                                            <bean:write name="addressInfo" property="street"/><br/>
                                                            <bean:write name="addressInfo" property="city"/><br/>
                                                            <bean:write name="addressInfo" property="pinCode"/><br/>
                                                            <bean:write name="addressInfo" property="state"/><br/>
                                                            <bean:write name="addressInfo" property="contact"/><br/>
                                                        </address>
                                                        <a class="changedeliveryaddress" href="./userAccount.do?action=showAddress&addrTypeId=<%=i%>">Change Delivery Address</a>
                                                    </div>
                                                </div>
                                                <div class="col-2 addresses-additional">
                                                    <h2 class="legend">Additional Address Entry</h2>
                                                    <%} else if (i == 3) {%>
                                                    <div>
                                                        <address>
                                                            <bean:write name="addressInfo" property="addrTitle"/>&nbsp;<bean:write name="addressInfo" property="addrFirstName"/>&nbsp;<bean:write name="addressInfo" property="addrMiddleName" ignore="true"/>&nbsp;<bean:write name="addressInfo" property="addrLastName"/>.<br/>
                                                            <bean:write name="addressInfo" property="house"/><br/>
                                                            <bean:write name="addressInfo" property="street"/><br/>
                                                            <bean:write name="addressInfo" property="city"/><br/>
                                                            <bean:write name="addressInfo" property="pinCode"/><br/>
                                                            <bean:write name="addressInfo" property="state"/><br/>
                                                            <bean:write name="addressInfo" property="contact"/><br/>
                                                        </address>
                                                        <a class="editaddress" href="./userAccount.do?action=editAddress">Edit Address</a> | <a class="deleteaddress" href="./userAccount.do?action=editAddress">Delete Address</a>
                                                    </div>
                                                    <%}%>
                                                </div>
                                            </logic:iterate>
                                        </div>
                                    </logic:present>
                                    <div>
                                        <div class="buttons-set">
                                            <%--<html:submit value="Submit" />--%>
                                            <a style="float:right;" onclick="javascript:return validateEditAccount('./userAccount.do?action=editUserInfo','userBean')"><img src="images/save.png" alt="Save Button" onmouseover="src='images/save-hover.png'" onmouseout="src='images/save.png'"/></a>
                                        </div>
                                    </div>
                                </div>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td><%@include file="/jsp/footer.jsp" %></td>
            </tr>
        </table>


    </body>
</html>
